import sys

try:
    # for Python2
    from Tkinter import *
except ImportError:
    # for Python3
    from tkinter import *
    
import tkMessageBox    

def helloCallBack():
   tkMessageBox.showinfo( "Hello Python", "Hello World")
   
def main():
    top = Tk()
   
    B = Button(top, text ="Hello", command = helloCallBack)
    
    B.pack()
    top.mainloop()

if __name__ == '__main__':
    main()